﻿@using System.Collections.Generic;
@using Think.Lenovo.Com.Common;
@using Think.Lenovo.Com.Models;
@using Think.Lenovo.Com.Models.Users;
@using System.Web.Mvc;
@using System.Web.Mvc.Html;
<html>
<head>
    <link href="/Contents/css/skin.css" rel="stylesheet" type="text/css" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Cache-Control" content="no" />
    <link rel="stylesheet" type="text/css" href="/Contents/resources/css/reset.css" />
    <link rel="stylesheet" type="text/css" href="/Contents/resources/css/style.css" media="screen" />
    <link id="color" rel="stylesheet" type="text/css" href="/Contents/resources/css/colors/blue.css" />
    <script type="text/javascript" src="/Scripts/lib/jquery-1.4.4.min.js"></script>
    <script type="text/javascript" src="/Scripts/lib/jquery-1.4.4.min.js"></script>
    <script type="text/javascript" src="/Scripts/ViewAddDataReport.js"></script>
    <script type="text/javascript" src="/Scripts/ViewRegisterUserStep2.js"></script>
    @*<script type="text/javascript">
        window.onload = function () {
            getProvince('CompanyProvinceId');
        }
    </script>*@
</head>
<body>
    <form action="/User/SaveUserInfo" method="post">
    <input type="hidden" name="UserId" value="@ViewBag.UserInfo.UserId" />
    <div id="content" style="background: url(/Contents/resources/images/background.png);">
        <!-- content / right -->
        <div id="right">
            <!-- table -->
            <div class="box">
                <!-- box / title -->
                <div class="title">
                    <h5>
                        完善用户信息</h5>
                </div>
                <div class="table">
                    <table>
                        <tr>
                            <td>
                                公司名称:
                            </td>
                            <td>
                                <input type="text" name="CompanyName" value="@ViewBag.UserInfo.CompanyName" maxlength="200" />
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                联系人真实姓名:
                            </td>
                            <td>
                                <input type="text" name="RealName" value ="@ViewBag.UserInfo.RealName" maxlength="50" />
                            </td>
                            <td>
                                *
                            </td>
                        </tr>
                        <tr>
                            <td>
                                公司地址:
                            </td>
                            <td>
                                <input type="text" name="CompanyAddress" value="@ViewBag.UserInfo.CompanyAddress" maxlength="128" />
                            </td>
                            <td>
                                *
                            </td>
                        </tr>
                        <tr>
                            <td>
                                公司所属区域:
                            </td>
                            <td>
                                <span>
                                    <select name="CompanyProvinceId" id="CompanyProvinceId" onchange="getCitiesByProvince(this,'CompanyCityId')">
                                        @{
                                            foreach (SelectListItem sli in (List<SelectListItem>)ViewBag.CompanyProvinceId)
                                            {
                                                if (sli.Selected)
                                                {
                                                    <option value="@sli.Value" selected="selected">@sli.Text</option>
                                                }
                                                else
                                                {
                                                     <option value="@sli.Value">@sli.Text</option>
                                                }
                                            }                                     
                                        }
                                    </select>
                                </span>
                                <span>
                                    @*@Html.DropDownList("CompanyCityId", ViewBag.CompanyCityId as List<SelectListItem>)*@
                                    <select id="CompanyCityId" name="CompanyCityId">
                                    @{
                                            foreach (SelectListItem sli in (List<SelectListItem>)ViewBag.CompanyCityId)
                                            {
                                                if (sli.Selected)
                                                {
                                                    <option value="@sli.Value" selected="selected">@sli.Text</option>
                                                }
                                                else
                                                {
                                                     <option value="@sli.Value">@sli.Text</option>
                                                }
                                            }                                     
                                        }
                                       </select> 
                                </span>
                            </td>
                            <td>
                                *
                            </td>
                        </tr>
                        <tr>
                            <td>
                                公司Email:
                            </td>
                            <td>
                                <input type="text" name="CompanyEmail" value="@ViewBag.UserInfo.CompanyEmail" maxlength="128" />
                            </td>
                            <td>
                                *
                            </td>
                        </tr>
                        <tr>
                            <td>
                                公司电话:
                            </td>
                            <td>
                                <input type="text" name="CompanyTel" value="@ViewBag.UserInfo.CompanyTel" maxlength="15" />
                            </td>
                            <td>
                                *
                            </td>
                        </tr>
                        <tr>
                            <td>
                                联系人电话:
                            </td>
                            <td>
                                <input type="text" name="UserPhoneNumber" value="@ViewBag.UserInfo.UserPhoneNumber" maxlength="15" />
                            </td>
                            <td>
                                *
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                <input type="hidden" name="FormatedUserName" value="@ViewBag.UserInfo.FormatedUserName" />
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                <input type="hidden" name="CompanyGrade" value="@ViewBag.UserInfo.CompanyGrade" />
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                公司注册日期:
                            </td>
                            <td>
                                <input type="text" name="CompanyRegisteDate" value="@ViewBag.UserInfo.CompanyRegisteDate" maxlength="22" />
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                公司类型:
                            </td>
                            <td>
                                @{           
                                    @Html.DropDownList("CompanyType");  
                                }
                            </td>
                            <td>
                                *
                            </td>
                        </tr>
                        <tr>
                            <td>
                                公司性质:
                            </td>
                            <td>
                                @{                                   
                                    @Html.DropDownList("CompanyProperty")
                                }
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                公司邮编:
                            </td>
                            <td>
                                <input type="text" name="CompanyPostalCode" value="@ViewBag.UserInfo.CompanyPostalCode" maxlength="6" />
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                联系人Email:
                            </td>
                            <td>
                                <input type="text" name="UserEmail" value="@ViewBag.UserInfo.UserEmail" maxlength="128" />
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                您对联想的期望:
                            </td>
                            <td>
                                <textarea name="Forward" rows="5">@ViewBag.UserInfo.Forward</textarea>
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                公司传真:
                            </td>
                            <td>
                                <input type="text" name="CompanyFax" value="@ViewBag.UserInfo.CompanyFax" maxlength="15" />
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                工商税务号:
                            </td>
                            <td>
                                <input type="text" name="CompanyBusinessNumber" value="@ViewBag.UserInfo.CompanyBusinessNumber" maxlength="50" />
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                注册资金:
                            </td>
                            <td>
                                <input type="text" name="CompanyRegisteFund" value="@ViewBag.UserInfo.CompanyRegisteFund" maxlength="15" />
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                <input type="submit" value="保存用户信息" />
                            </td>
                            <td>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
